* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'my-consolas';
    src: url('./consola.ttf');
}

body {
    min-width: 1400px;
    /* max-width: 1400px; */
    margin-bottom: 200px;
    font-family: '宋体';
}

.container {
    margin: 0 auto;
    max-width: 1400px;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    border-radius: 12px;
    background: #e4e4e5;
}

:root {
    --line-height: 25px;
}

h1 {
    font-size: 32px;
    text-align: center;
    margin: 12px 0;
}

.row {
    padding: 0;
    padding-right: 120px;
    display: flex;
    justify-content: center;
}

/* @media screen and (max-width: 1200px) {
    .row {
        padding: 0 24px;
    }
} */

.row > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.asm {
    min-width: 460px;
}

.asm,
.regs {
    margin: 8px;
    padding: 8px;
}

/* .asm::-webkit-scrollbar {
    display: none;
} */

.sub-title {
    text-align: center;
    margin-bottom: 8px;
}

/* 
* #fc8800, #fed998
*/
.memory {
    background: #f9f9f9;
    border: 1px solid #25772f;
    width: fit-content;
    border-radius: 5px;
}

.memory.has-pointer {
    margin-left: 80px;
}

.memory-item {
    display: flex;
    height: var(--line-height);
    line-height: var(--line-height);
    text-align: center;
    border-bottom: 1px solid #a4e0a7;
    font-family: 'consolas', 'my-consolas';
}

.memory-item .add {
    min-width: 7em;
}

.memory-item > div {
    padding: 0 8px;
    border-right: 1px solid #a4e0a7;
}

.asm .memory {
    border-color: #d26700;
}

.asm .memory-item {
    border-color: #fed998;
}

.asm .memory-item > div {
    border-color: #fed998;
}
.regs .memory {
    border-color: #71168a;
}

.regs .memory-item {
    border-color: #dd9be0;
}

.regs .memory-item > div {
    border-color: #dd9be0;
}

.memory-item .val {
    flex: 1;
    text-align: left;
}

.memory-item > div:last-child,
.memory-item:last-child {
    border-color: transparent;
}

.pointer {
    height: 0;
    display: flex;
    /* transform: translateY(calc(var(--line-height) * 0)); */
    /* transition: 0.3s; */
}
.pointer .name {
    width: 0;
    transform: translateX(-70px);
    z-index: 1;
}
/* 左边箭头的实现 */
.pointer .arrow {
    position: relative;
    width: 0;
    height: calc(var(--line-height) - 14px);
    --arrow-color: #fed998;
}
/* 矩形部分 */
.pointer .arrow::before {
    position: absolute;
    content: '';
    width: 25px;
    height: 14px;
    transform: translateX(-40px) translateY(calc(var(--line-height) / 2 - 7px));
    background: var(--arrow-color);
}
/* 三角形部分 */
.pointer .arrow::after {
    position: absolute;
    content: '';
    height: 0;
    width: 0;
    border: calc(var(--line-height) / 2) solid transparent;
    border-left-color: var(--arrow-color);
    transform: translateX(-20px);
}
/* 当前行 */
.pointer .rect {
    background: #d5251530;
    width: 100%;
    height: var(--line-height);
}

.controls {
    padding: 24px;
    padding-bottom: 0;
    display: flex;
    align-items: center;
}

button {
    color: #fff;
    background: #0064fa;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    margin-right: 8px;
    cursor: pointer;
}

button:hover {
    background: #0062d6;
}

button:active {
    background: #004fb3;
}

input {
    background: #f4f5f5;
    border: 1px solid transparent;
    outline: none;
    width: 80px;
    margin: 0 8px;
    padding-left: 16px;
    height: 35px;
    font-size: 16px;
    border-radius: 5px;
}

input:hover {
    background: #eceded;
}

input:focus {
    border-color: #0064fa;
    background: #f4f5f5;
}

.info {
    margin: 0 24px;
    /* margin-bottom: 0;
    margin-top: 0; */
    padding: 8px;
    /* text-align: center; */
    /* border-bottom: 1px solid #ededee; */
}

.info .output {
    margin-top: 8px;
}

/* .asm {
    height: 500px;
    overflow: auto;
} */

.hide {
    display: none;
}

.minimal {
    height: 600px;
    overflow-y: auto;
}

input[type='checkbox'] {
    width: auto;
    height: auto;
}

.max-tree {
    display: flex;
    align-items: center;
    margin-top: 64px;
    flex-direction: column;
    width: fit-content;
    min-width: 100%;
}

.tree-row {
    display: flex;
    justify-content: center;
}

.tree-node {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #c6cacd;
}

.c-code {
    position: relative;
    margin: 48px;
    margin-top: 12px;
    font-family: 'consolas', 'my-consolas';
    font-size: 20px;
    background: #f1f3f4;
    padding: 24px;
    border-radius: 16px;
}

.code-line {
    display: flex;
    z-index: 3;
    height: 25px;
    line-height: 25px;
    letter-spacing: 0px;
}

.line-number {
    min-width: 40px;
}

.indent-1 {
    padding-left: 50px;
}

.curr-code-pointer {
    z-index: 1;
    position: absolute;
    left: 40px;
    height: 25px;
    width: 300px;
    background: rgba(255, 162, 0, 0.3);
}
